Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

Fix computeKnownBits for ARMISD::CMOV #67

Merged
merged 1 commit into from
Mar 23, 2017

Conversation

arielb1
Copy link

@arielb1 arielb1 commented Mar 23, 2017

Summary:
The true and false operands for the CMOV are operands 0 and 1.
ARMISelLowering.cpp::computeKnownBits was looking at operands 1 and 2
instead. This can cause CMOV instructions to be incorrectly folded into
BFI if value set by the CMOV is another CMOV, whose known bits are
computed incorrectly.

This patch fixes the issue and adds a test case.

Reviewers: kristof.beyls, jmolloy

Subscribers: llvm-commits, aemerson, srhines, rengolin

Differential Revision: https://reviews.llvm.org/D31265

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298624 91177308-0d34-0410-b5e6-96231b3b80d8

Summary:
The true and false operands for the CMOV are operands 0 and 1.
ARMISelLowering.cpp::computeKnownBits was looking at operands 1 and 2
instead.  This can cause CMOV instructions to be incorrectly folded into
BFI if value set by the CMOV is another CMOV, whose known bits are
computed incorrectly.

This patch fixes the issue and adds a test case.

Reviewers: kristof.beyls, jmolloy

Subscribers: llvm-commits, aemerson, srhines, rengolin

Differential Revision: https://reviews.llvm.org/D31265

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298624 91177308-0d34-0410-b5e6-96231b3b80d8
@alexcrichton alexcrichton merged commit 2e951c3 into rust-lang:rust-llvm-2016-10-29 Mar 23, 2017
TimNN pushed a commit that referenced this pull request Apr 23, 2017
Fix computeKnownBits for ARMISD::CMOV
arielb1 pushed a commit that referenced this pull request Jun 27, 2017
Fix computeKnownBits for ARMISD::CMOV
JajaumaPackages pushed a commit to JajaumaPackages/llvm that referenced this pull request Aug 21, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants